﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace ToDoClear
{
    public class ToDoCanvas
    {
        #region static 变量
        private static string TAG = "ToDoCanvas";
        private static ToDoCanvas mToDoCanvas;
 
        public static void Init(Canvas c)
        {
            mToDoCanvas = new ToDoCanvas(c);
        }

        public static ToDoCanvas getInstance()
        {
            return mToDoCanvas;
        }

        public static UIElementCollection RootTree()
        {
            return mToDoCanvas.mRootCanvas.Children;
        }
        #endregion


  

        private Canvas mRootCanvas;
        public Canvas RootCanvas
        {
            get {
                return mRootCanvas;
            }
            private  set{
               mRootCanvas = value;
            }
        }

        public ToDoContext context;
        private ToDoCanvas(Canvas c)
        {
            RootCanvas = c;
            context = new ToDoContext();
        }



        public ToDoList cuList;

        

    }
}
